home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmMain
- BackColor = &H0000FFFF&
- ClientHeight = 4170
- ClientLeft = 60
- ClientTop = 330
- ClientWidth = 4680
- Icon = "learn.frx":0000
- LinkTopic = "Form1"
- ScaleHeight = 4170
- ScaleWidth = 4680
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton Command6
- BackColor = &H00FFFFFF&
- Caption = "Open CD tray"
- Height = 975
- Left = 0
- Style = 1 'Graphical
- TabIndex = 9
- Top = 2280
- Width = 1215
- End
- Begin VB.CommandButton Command5
- BackColor = &H00C00000&
- Caption = "Close CD tray"
- Height = 975
- Left = 1200
- Style = 1 'Graphical
- TabIndex = 8
- Top = 2280
- Width = 1215
- End
- Begin VB.Timer Timer1
- Interval = 100
- Left = 120
- Top = 1680
- End
- Begin VB.CommandButton Command4
- BackColor = &H000000FF&
- Caption = "Get The Message"
- Height = 495
- Left = 1200
- Style = 1 'Graphical
- TabIndex = 6
- Top = 1680
- Width = 1215
- End
- Begin VB.TextBox Text1
- BackColor = &H0000FF00&
- Height = 285
- Left = 1440
- TabIndex = 5
- Text = "Unknown"
- Top = 1320
- Width = 3135
- End
- Begin VB.CommandButton Command3
- BackColor = &H00C00000&
- Caption = "Clear"
- Height = 255
- Left = 3360
- Style = 1 'Graphical
- TabIndex = 4
- Top = 360
- Width = 1215
- End
- Begin VB.CommandButton Command2
- BackColor = &H00FFFFFF&
- Caption = "Down"
- Height = 255
- Left = 1680
- Style = 1 'Graphical
- TabIndex = 3
- Top = 360
- Width = 1215
- End
- Begin VB.CommandButton Command1
- BackColor = &H000000FF&
- Caption = "Up"
- Height = 255
- Left = 0
- Style = 1 'Graphical
- TabIndex = 2
- Top = 360
- Width = 1215
- End
- Begin VB.TextBox txtBottom
- BackColor = &H0000FF00&
- Height = 285
- Left = 0
- TabIndex = 1
- Top = 720
- Width = 4575
- End
- Begin VB.TextBox txtTop
- BackColor = &H0000FF00&
- Height = 285
- Left = 0
- TabIndex = 0
- Top = 0
- Width = 4575
- End
- Begin VB.Image Image1
- Height = 2250
- Left = 2400
- Picture = "learn.frx":030A
- Top = 1680
- Width = 2250
- End
- Begin VB.Label Label1
- BackColor = &H0000FFFF&
- Caption = "Type In Your Name:"
- Height = 255
- Left = 0
- TabIndex = 7
- Top = 1320
- Width = 1695
- End
- Attribute VB_Name = "frmMain"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal _
- lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal _
- hWndCallback As Long) As Long
- Dim C As String
- Dim CO As Integer
- Dim FS As Long
- Private Sub Command1_Click()
- txtTop.Text = txtBottom.Text
- txtBottom.Text = ""
- End Sub
- Private Sub Command2_Click()
- txtBottom.Text = txtTop.Text
- txtTop.Text = ""
- End Sub
- Private Sub Command3_Click()
- txtBottom.Text = ""
- txtTop.Text = ""
- End Sub
- Private Sub Command4_Click()
- MsgBox "Hi " + Text1.Text, vbExclamation
- MsgBox Text1.Text + " Is The Coolest Person I know!", vbExclamation
- End Sub
- Private Sub Form_Load()
- Timer1.Interval = 100
- Me.Caption = "A learning Program, by ***VBwizzKID***"
- C = Me.Caption
- CO = Len(C) + 1
- Me.Caption = ""
- If Me.BorderStyle <> 2 Then
- FS = Me.ScaleWidth + 250
- Else
- FS = Me.ScaleWidth + 500
- End If
- End Sub
- Private Sub Form_Resize()
- If Me.WindowState = 1 Then
- FS = 3500
- Else
- FS = Me.ScaleWidth
- End If
- End Sub
- Private Sub Image1_Click()
- MsgBox "Tornado Enterprises, This Program was coded by the ***VBwizzKID***", vbInformation
- End Sub
- Private Sub Timer1_Timer()
- On Error GoTo ATH
- Static C01 As Integer
- Static CO2 As Integer
- Static a As String
- Dim R As String
- Dim T As String
- If CO > 0 Then
- C01 = CO
- T = Mid(C, C01, 1)
- CO = CO - 1
- R = " "
- Mid(R, 1) = T
- Me.Caption = R & Me.Caption
- Else
- a = a & " "
- R = " "
- Mid(R, 1) = a
- Me.Caption = R & Me.Caption
- End If
- If CO2 >= FS Then
- CO2 = 0
- CO = Len(C)
- Me.Caption = ""
- GoTo XX
- Else
- CO2 = CO2 + 50
- End If
- Exit Sub
- End Sub
- Private Sub Command6_Click()
- MsgBox Text1.Text + " This may take a while so be patient!", vbExclamation
- Dim Dummy As String
- Dummy = vbmciSendString("set cdaudio door open", 0)
- End Sub
- Private Sub Command5_Click()
- Dim Dummy As String
- Dummy = vbmciSendString("set cdaudio door closed ", 0)
- End Sub
- Function vbmciSendString(ByVal Command As String, ByVal hWnd As Long) As String
- Dim Buffer As String
- Dim dwRet As Long
- Buffer = Space$(100) ' Create a buffer
- dwRet = mciSendString(Command, ByVal Buffer, Len(Buffer), hWnd)
- vbmciSendString = Buffer
- End Function
-